package be.sc.classicnetwork.dao;

import java.util.Collection;

import be.sc.classicnetwork.model.Car;
import be.sc.classicnetwork.model.Contact;
import be.sc.classicnetwork.model.Image;
import be.sc.classicnetwork.model.Make;

/**
 * Dao Car.
 */
public interface CarDao extends GenericDao<Car> {

    /**
     * findAll.
     */
    PaginationSearchResult findAll(int first, int max, boolean enableFilterPublished);

    /**
     * countMakes.
     */
    Collection<Object[]> countMakes(boolean enableFilterPublished);

    /**
     * findByMake.
     */
    PaginationSearchResult findByMake(int first, int max, boolean enableFilterPublished, Make make);

    /**
     * findImageById.
     */
    Image findImageById(String id);

    /**
     * Gets a list of contact emails to send a notification for a specified Car.
     * The rule is : Contacts that have selected the car make and that haven't
     * blocked the car site.
     */
    Collection<Contact> findContactsForNotification(String carId);

    /**
     * findByModel.
     */
    PaginationSearchResult findByModelOrMakeLike(int offset, int maxPageItems, boolean enableFilterPublished,
	    String queryString);

}
